using System;
using System.Diagnostics.CodeAnalysis;
using Bookvar.ObjectModel;
using Bookvar.ObjectModel.Actions.Collaboration;
using Bookvar.UI;

namespace BookvarWpf
{
    /// <summary>
    /// Defines a presenter for the MainPage.
    /// </summary>
    public interface IMainPagePresenter
    {
        CollaborationMode CollaborationMode { get; }

        void StartCollaborationServer(MindMapPanel mindmap, string hostUserName);

        void StopCollaborationServer();

        IAsyncResult BeginConnectToServer(string host, string clientName, AsyncCallback callback);

        CollaborationUser[] EndConnectToServer(IAsyncResult asyncResult);

        void StopCollaborationClient();

        [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
        MindMap GetMindmapFromServer();

        void SendActionToServer(ActionBase action);
    }
}